/*
 * Copyright (c) 2023, 2023,yzc.cn All rights reserved.
 *
 */
package com.crmapi.controller;

import com.crmapi.mapper.AttachmentMapper;
import com.crmapi.pojo.Attachment;
import com.crmapi.pojo.Result;
import com.crmapi.service.AttachmentService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>Project: CRMSystem - AttachmentController</p>
 * <p>Powered by yzc On 2023-12-04 15:19:27</p>
 * <p>描述：<p>
 *
 * @author yzc [yzc0415@126.com]
 * @version 1.0
 * @since 17
 */
@RestController
@RequestMapping("api_v1.0")
@Api(tags = "合同附件管理")
@Slf4j
public class AttachmentController {

    @Autowired
    AttachmentService attachmentService;

    @GetMapping("/attachment/list")
    public Result queryAttachment(String contractId) {
        List<Attachment> mapperList = attachmentService.queryAttachment(contractId);
        return Result.success(mapperList);
    }
}
